Cherrypicked everything from pagination fix branch so we can merge this ...

...into dev-angular.