Corrected over-aggressive replace