HW4: Small bug corrected.