fix parseUri to accept localhost