Fix for language detection and redirect