MongoDB: Fix pagination for last page