fix a client crash