Cyclic dependency causes exception