Fix for cellcounter/cellcounter#194

Closes any open dialog boxes prior to opening new one.