Bug in icon-only button

Bug in icon-only button

When create icon-only button ({text:false, icons{primary:"icon-gear"}})
button has class ui-button-text-icon-primary that move primary icon to the left side.
If remove class icon moved to center.

upd: i see in jquery.ui.button.js
line 296: append classes to array
line 308: remove classes from element!!!
buttonElement.removeClass( "ui-button-text-icons ui-button-text-icon-primary ui-button-text-icon-secondary" );
i think this need a fix.
line 317: add classes from array => classes overwrited.