syntax transmigrification and fixed duplicate handling