fix typo calcDifficulty