Task 252: Fix bug with closing pop-up.