Commit fix calculate pagination