Rename check point function to check_max_min

Solve bug with max and min points