Remove wait from stop, with wait function it is not necessary
Correct usage of wait method and flow control