fixed bug with pages