Generator edited/ bug fix