Change active class before verifying the current page.