Fix bug in iOS 8.