Added a check for client existance