bug fix (calculation of this._lastEntryIndex)