fixed crash on iOS 6