Popup bug fix