fix some errors when parse url