Fixed issue with a find and replace operation