Fix bug identified by students and confirmed by grader Jobin.