fixed bugs at chat