Fixed issue with xor