removeBeforeIndex should check the page index itself instead of timestamp