guarding against pagination error in printing