debug when selection is reversed