Fix a bug about the output

Minor layout changes for the generated code.