fix bug in jquery click event