Fix bug with popup