See #51, resolve dependencies before calling initialize
Merge pull request #59 from creynders/fix_51_2

See #51, resolve dependencies before calling initialize