Fixed several warnings and a subtle bug in Not Until formulas