Modify capacity in hashmap