Fix disabling buttons bug