fix fields unique codes