client: fixed a bug on tab comletion, fixes #238