fix(traverse): use traverse instead of replace