fixed XOR operation