Fixed issues within min(A, B) and max(A, B)