Chat history fix