fixed problem with db search