Explain carefully the doctrine of comparative advantages based on the concept of specialization. What problems are often encountered when nations attempt to individually maximize gains from trade through specialization?