Fixed errors in C for loop syntax closes #5