Fix issues with labels in generators