fix search and gallery