fixed bug in removeClient