Fixing String replacement