Correct Gateway class so that it uses the user defined timeout variable, not 1