fixed bug where demo window still shown after popup dismissed