Setting the stop event
Handle the fact that stop is blocking