fixed expand_args and tp