Fix non exiting client issue