some minor model and scaffolding bugfixes