error in generator corrected