fixed an error: in IE, a.pathname doesn't begin with /