Remove NaN values before interpolating.
Improved marking of bad trials.