fix error on iOS 8