fix client crash when plugins send messages