guard against pages being set to 0 and increased page size to 10
debug homepage to show totals correctly