added fancy matt hsu stuff to allow urls to work