Fix code generator error with incorrect fn(,) endings