Fix index creation error when already exists.