revise Ogen's code