Merge pull request #108 from charsleysa/metadata

Bug fixes and workarounds