Adds callback for pagination changes to fix #2