fix errors in generator; add generator to build