Fix for canceling connection and pidrive