First pass at fixing concurrency issue