Fix issue with currentMetadata.