Fix js when having multiple pop-overs