do cleanup on duplicates
api change.