fixed errors with NaN during evolution