Small bugfix in pages creation of pagination