Fix a few iOS 6 issues