Patch up NaN values in error bars