bug fix: show the subpage on the right only if the main page is its closest parent