Fixed the presence tracking bug in socket.js.