fixed bug in ClientState