Bits of code to fix small problems.