Fix min/max mistake.