Fix connection fail.
it's necessary more error control.