fixed small error with generator