Fixed problem with circular dependencies