fix read-metadata call