Fix getDependencies function.

I wonder how this worked in the first place.