Fix connection errors