Fix white page display when switching languages

With this fix, users will be able to switch between languages without receiving a white page on their browser.