Corrected button enabling/disabling