fix search forward/backward mixup