fix some errors with search