fixing edge case when prefix and namespace cannot be found