Fixed elo math function