Make building of meta data more robust