Bugfix for chat refactoring