Fix 'Transport endpoint not connected' errors. Closes GH-437.