fix nesting for sub-pages