fixed bug about err.rate in errpkt