thrift port NaN bug fix