Fixed hanging waiting for timeout.