fix for enablePopup mode