fixed the double click bug