fixed bug in decoder.py