Made some fixes to the formula