fix error in chat