Bug fixing in the open connection error