fixed bug with button disabling