fixed the issue of multiple popups, refs #32