Fix issues with improper generation