fix rankProfiles so it only edits the relevant section of the page.