improve error message
xor rather than increase negate_det