Fix misreplacement.
wip refactor.
to_h should be invoked with raw_data.