fix bug with default value for timeout