Fix for stdlib max function