pred_res: fix scope