fixed mistake in circular dependancy detection