[fix] return the right value in applyFormula

Change-Id: I7ec58e511336f4a8e055eec7a33e3aca87aa9b5f