Modifications for handling the  Multiple Popup Issue