fixed the code to initialize the metadata table.