Fixed c code