fix the bug in parse_uri