fix bug with incorrect timeouts