fix wrap_args memory leak