Turns on off not working properly