Fix crash in iOS 8