fixed bug in sub-pages