Made popups non-modal and fixed popup opening twice