Fix size of NaN vector returned so that resid.m does not crash