Fix and ui tests for pagination bug.