fixing double click duplication