fixes crash on iOS 8