Bugfix for pagelimit check