fix wrong type args bug

when a api call has wrong type args, it may damage the next right calls.
 this pr fix this

@lxyu @wooparadog