Search Working, Need to correct end of strings while message passing