Fixed switch bug.

Resolved issue where “off” class was not being removed from dynamically
created switches.