Fixed bug with buttons