Fix metadata tests