fixed the mouse event capture problem