Fix hash map code