stopped infinite loop if timeout