Fix bug in Client