did debug on a few edge cases in Generator