fixed zidv bugs reported by Bob