I think I know how you got that negative value. Is it possible that one of the ricochet hits is read as negative since it didn’t come from the guns direction, for example: the ball falls down from hitting the wall and its backside hits the cube causing a negative hit?
Perhaps that’s the cause?