fixed a horrible vm_compare bug