c: fixing my stupidity