fixed bug where popup doesn't go away opening the currently active page