Change HashMap to ConcurrentHashMap to prevent corruption when accessed concurrently