fix bug with pop-up overlay