fix bugs in find_visible