Fix metadata check