Corrected bug in switch code and re-enabled all switch