bugfixing in redirect for discovery service