Minor fixes to create metadata tables