fix writting last entry seqnum to index