Running update_index.py

Also fixed a minor bug in the script.