Fix replaceUrlParams(): Cannot read property 'name' of undefined