fix log message page index calculation