Corrected dimensions in c code