Fix Error when PopupAPI not loaded