Fix main index unit tests