fix bugs
Merge remote-tracking branch 'origin/client_porting_typescript' into client_porting_typescript