Close client after stopping the process

First try to stop the process.