Fixes to index.py
Fixes to di.py