Found first bug; OR instead of XOR