add fixes to CvGenerator