fixed the setdv bugs