Moving the outlier check inside the conditional.