Fixes broken generator regex. still ugly...