Added corrections according to HW6.