duplicate check fixed