tweaks to uri parsing