Fix failure with non-UTF-8 metadata