fix a calculation mistake