Fix errors and oversights