Improve dependency resolution