bunch of fixes to hashmap