Fixed the case where the string isn't found