fixed short circuit issue when parsing formulas