fixed some typos in the c code