Updated index to fix some bugs