Fix bug caused when comparing URLs with root path only.