QuickMagic Step 3: fix a few minor bugs
fix typo in demag_gui