Fix duplicated hash keys