Changed selection logic -- fixed revert