Fixing bugs on disconnect and newuser event