resolve mouse dragging bug