Fixed bug.
Removed leaves from dependency graph.