Fixed an issue where if an array for index data is not passed in