fixed small bug regarding multiple popups