fixed the C-errors