Fix errors from log files and add missing functions.