Added a check on the timeout input.