fix bug on mouse event