Fixed a class cast exception in Autocompleter Index creation