fixed various bugs related to localized urls