again fixing how the code of the models is generated to make it work