fixing bugs on generators