fix model behaviour and more tests