Fixed arithmetic error