Close multiple popups

Fixes #218