Added support for iOS 6