Switched a loop index from a double to an int.