Improve dependency check.