Fix crash on iOS 6