fix popup visibility