Fix bugs. C