fix complex decoding