c: corrected mistakes