Fix crash on iOS 6 issue