Need to encode the `out` hash instead of the `data` one here. Will fix it during the merge.