Improvements to connector delete function