fixed bug with buttons