Fixed a bug with hidden pages