Fixed bug when showing bar.