Now updating the index correctly