Bugfix: pagination did not work with empty result set