client: fix a bug