fix for concurrency issue