Fixed bug with the indexing into range and damage arrays