Prevent HashMap duplicate keys

HashMap now overwrites values when inserting a value for a key multiple
times.