fixing sanitychecks, using always string for encoding/decoding