Fix encoding of what we store