Fix bug in get_deps