Fixed bug in extraction of metadata.