Fix error handling on HEAD request
v0.5.3