fixed a few mistake.

-Still significant problems with decode