fix bug with buttons