Fix selection logic