fixed bug in bar