fix timeout bug