fix item damage code based on earlier branches