fix generator problem