fixs setting the solenoid state