changes button active state