fixed switches so that they'll work properly inside a custom form