Fixed typo bug in generation