Fixes #211, pop-ups resized if necessary