Fix handling of link query string.