fix up item damage code based on earlier branches