trying to fix the concurrency issues