Major fix for indexing.