fix duplicated entry for re-running SQL