wrong logic makes search box results printed out other users messages