Fix generation errors