fixed bugs in find