Part 1.2: obvious fixes for some code