Fix error in when checking is_portal_root