Replaced the numeric_limits thing with INT_MAX