fix chat wrapper for linux, all tests passed