fix popup bug