Fixes for warning of iOS 6