fix exception throwing when fields are duplicated