fix up duplicate variables in regenerator