Fix detection of fetch URL.

Close #155.