iOS 6 deprecation warning fixes