Fixed a bug with socket.io