Fixed bugs with double click event