thrift connection bug fix