some bug fixes.

thrift is so damn comprehensive..