fix bug when model has not output_space