Fix HEAD on exceptions