Update max to std::max