Some fixes after the recent Model refactoring