Fix character replacing