Fix switch on/off on iOS 7