position selection logic fixed