Added some protection from circular dependencies