Fix a few concurrency issues for iOS 8