more work on chat and error messages