Fixing the user disconnection in chat