fixed erroneous replacement if the lang code was part of the url