check for dependencies more carefully