Task 252: Fix bug with closing pop-up.
Merge branch '252' into test