fixes #5 fix creating dependent objects out of order