Adds better popup handling for map popovers