bugfix temporaryIndex