Make HEAD test work correctly