One more bug fix, if x is all NA's