Fixed a popup not hiding issue