fixed some stuff with the search