fix a few C syntax issues