minor fixes to make C semantics work more correctly
more fixes
Merge pull request #1170 from dwightguth/cfixes

minor fixes to make C semantics work more correctly