Fix some bug:
1. can't read and write hash map
2. Thread access the same resources