fix connection error trap