update hashmap infinite loop