fixed missing $ in generate script