fix for decoding