fix ivar
use pars_err instead of perr