Made link shortening work with socket.io