Metadata plugin fixes

This is mostly to facilitate fixes required to bookish.