corrected a missed generator closing