Don't modify index before you use it