fixed bugs in ex C

u_i = 0 will now not be calculated