Fixes a bug that the page title for the title tag in the head tag will miss the page title for hidden pages. Fixes #24
Fixed a bug that caused an undefined index warning introduced since the last commit.