fix c code