fixed a few bugs with cv