Add two function for PopupManager