fix reverse scan