Prevent crash on pagination.