fix duplicated-column case + test