Fixed warnings for iOS 8