fixed bug with buttons active state