errorfix in c code