consistent timeout logic