Fix socket.io bug by making it a singleton