Update Generator.php

bugfix