prevent potential error with closing QuickMagic window