Fixed search output bug for empty substituions