disable buttons correctly