Fixed bugs in scaffolder