Modified for iOS 6.1