Fix typos and undecoded pathname issue