fix incorrect stacking order of popups