Fix typo and wrong output value.