Added fixes for iOS 8 SDK