Fix for indexing of list