fixed code generation templates