Fixed bug in setting bar style.