correcting bad generation