Fixes issue #110. Dependency was being used before being set