Fix errors in urlparse and result processing