Fix a segment fault in client side.