Small change to popup selection logic