Popup and form fixes