fixed the generator assignment