Handling disabling buttons