Now resets the current popup variable back to it's parent when the popup is closed.