If the page changes its url somehow while loading then we might miss this. Can you check the sidebar-title against the title to match instead?