Fix problem with generation constructor