Updated std::min and std::max