Updated decoding

Fixed issue with encoded == string