fix for issue(#51) - writing double `[[headers "foo"] headers "foo"]`

see more detailed description of problem in issue #51