Fixed a crash on iOS 5