fixing pages length in generator