fix indexing: p->offset is for par not theta
Merge remote-tracking branch 'origin/master'
pred_res: fix scope