Fixed some code that broke original chat module