fixed issues caused by socket.io being really, really stupid about json-fication.