Added check for trailing / in currentLoc.pathname on default url\