fix client crash