Fix metadata sanity script