Minor bug fix in code text generator, wasn't properly generating code