The basic problem with the Non-Proliferation Treaty is there's no teeth in it, no penalties for countries that don't comply. Worse, as you say, the very naïve structure of the NPT has actually made it helpful for countries who want to acquire nuclear weapons. Iraq, North Korea, Iran, all used the NPT to build up their nuclear programs.