Fix bug in client caused by refactor