Fixing dependancy loop