Fix of encoding e decoding in search