fix typo calcDifficulty (line148)