Fixed the index problems, should be fully functional