Remove the # mark when location.hash == ""

Same as #672; I'll just leave this until further testing.