fix HEAD reply
update tests