fix iOS 6 crash