Change pause process

I was made to execute completely the asynchronous function called at the time of a pause event.