various fixes, mostly pagination-related