fixes bug of double counting clicks