Fixed generate view indexing error