Fixes for socket.io