Fine-tuning of automatic window selection algorithm.