Fixed a crashing issue for iOS 8.