Fixing the dragging feature