Fix crash on iOS 5