fir nms error in reduced.R