added fixes for iOS 7