minor fixes to make C semantics work more correctly

@andreistefanescu @yilongli please review
this comment could be removed