Fixed so there are no circular dependencies in spring