Please use Infinity instead of Number.MAX_VALUE.