fix button states