Made wait for termination loop infinite