check for not-NaN and fix colors