attempted to fix concurrency issues