Fixing bug where user immediately leaves chat after joining it