fixed bug in _setCustomStyle

method generated exceptions when called in a buttonShape context