Popup fix

hopefully this should finally fix #37

please test/review