fixes the language switches when using a basepath