Fix to 2 errors

error C2666: 'min' : 4 overloads have similar conversions.
error C2661: 'max' : no overloaded function takes 1 arguments.