Dirty workaround on generator