Fixing concurrency issue with analytics API.