Made the internal outlier checking more robust.