Solves nesting issue for non-root current pages