tweaks to url scheme determination. Had caused errors