fix timeout loops