Fix metadata update issues