fix reading byte_array in plain encoding