Check for max not min

Signed-off-by: Walker Crouse <walkercrouse@hotmail.com>