Added error test for XOR