Correctly "close" sections in headers field, if something went wrong
(#8)