Fixed iOS 7 deprecation warnings