Fix selection-based detection