Fix some iOS 6 issues