Fixing pagination summary being off when total record count is lower than per page number