Add text/plain headers to examples, fix a minor bug