Fix serialization of hash maps.