Fix errors and warnings.