Altered C files to solve problem