Corrections to part 3 code.