fixed dragging bug