fixed a lot of issues with model transformations