Added suport for iOS 6