Fix crashing on iOS 8