set zero when large relative error happens