Popup fix and other misc changes