some fix inside the reverse replacement function

1 job for master
Status Job ID Name Coverage
  Test
canceled #1155
docker_build