fixed the algoritm of recursive dependency calls