fix popup hiding bug, class clash