fix bug of being executed by running `rake generate`.