Tweak to the GenerateEndPoint method