fixed decoding bug
cleanup