corrected connect exception handler