One attempt at fixing the generator.

This way seems bad, but I wanted to prove it worked before trying a different method.