Fix bug causing users to disconnect