Fixed problem with double encode of contents.