fix bug where scratch activecode id would be invalid if the page had a query string in the url