Bug fix with find_and_replace when used for deleting