fix more TypeErrors when closing the connection
bump version and changelog