Fix on/off glitch sometimes