Tweaked the betaVar optimization to apply to more cases