fixed some errors related to compiling generated code