fixed error in filter interaction with db