correction of JS for duplicates ...