Fix some stuff based on book errata