Fixed a SERIOUS bug in a for loop. C needs to be statically typed.