Fix code generation