fixed bar removal bug