Changed order of timeout left check