dealt with connection errors