fix duplicated rows