Fixed a bug where dependencies were not being constructed properly.