added fixes for the memory hashmap so it doesn't get reseted