fixed bug in chat plugin