fixed undefined assignment
in pages