A fix for HW6.