fixed decoding problem