Fix encoding for get bytes.