fixed language switcher bug which can't switch URL properly if the location is ended by '/'