Small fixes for script gen.