Some other fixes to scaffolding  code