fix bug with popups