correcting pagination table