fix usage counting maths