Fix the dragging bug