Fix up handling of connection issues