Fixed syntax errors in generated code