fix max_xor (not by myself)