Corrected issues in generation