hacky solution to fix concurrency issues