slight changes to javagen and error fixing