generator: minor fixes