Fix issue testing HEAD of wrong URL