Trying to fix the issue with concurrency within this class