fixing bug with buttons becoming disabled