Added pagination functionality for problems.