Fixing the popup window.

It should now close when the user clicks anywhere outside the popup
window.