fix the mistake in wrapping formulas