Fix bug in cv