Fix bug in turn_off method