fixed a bug that the rest output parameter is set incorrect