When testing with a large dataset, an error happens due to the index of the assigned colors is out of the boundary of the list of available colors.