fixed bugs with various buttons