fixed bug in decode
fixing