Fix incorrect use of math.min().