Make $on and $off a little bit safer