minor improvements for find_unused