fixed some na behaviour which affected the lm and smooth fittings