Fixed copying of hashmap for non-pod types.