Fix: connection error handling