fixed the bug that broke popups for singletons