Some fixes for C-code

it does not work any way