fixed a popup bug re closing