fix regex and location.href