Update MagicInstance.cpp