Fix for concurrency issue identified by Xcode 6.