fix up main causes of structure generation failure.  I'm sure there are
more, but things are now generating properly.

Closes #15