fix min/max handling for timeout