fix crash on iOS 8