replaced Dictionary with ConcurrentDictionary hoping to fix the sync problems