Changed the code

I was appending characters to the decoded string like a moron. I fixed this.