Adapt generator to recent changes in core