Fixed variable names in generate netlist function