Avoid having problems with max_value