How to prevent the popup prematurely.