Fixed some issues with the tests and with the models
Fixed a error in a test