Fixed set indexing error