How Generators Work, And How To Fix Them