Fix find and replace introduced bug