Slight fixes to C-code