fixed socket error routing