Fixed blocking stop() fct for tests