Fix compiler errors in generator