Avoid a potential crash while managing pagination