corrects bug with t=0,y=0 and log models, by discarding values if y=nil