fixed various bugs related to localized url