Add generator fix created by phallstrom in commit ada2d2