Fixed iOS 6 deprecations