fix timeout 0 ms bug