bugfix when pagination is set to false