Added synchronization for hashmap