Popup handling much smoother