Fix for cases when the type mapping is different from the domain in the url