Improved dependency check.