fixed some C-compliance errors