fix issue where build fails if no metadata is present