fix popup menu bug