error in generator