HW3: Bug-fix