Fix crash on iOS 6.x