Fix error when passing url with #dir/path