Fixed bug where clicking below the popup did not close it.