fixed the bug with chat