fix things to generate ex

Version 1.